/*
 * BCCHClass1.h
 *
 *  Created on: 2015年7月16日
 *      Author: Administrator
 */


#ifndef CLASSONE_H_
#define CLASSONE_H_

struct ST1A_MiscInfo{//– Unit of 0,5 dB. Range: 0 – 6,0 dB
	unsigned char SB_RESELECTION_HYSTERESIS;
	//<SCAN_LIST_FLAG: bitstring(1)> – Indication to scan the entire BCCH_FULL_ LIST
	//– 0: do not scan the list
	//– 1: scan the full list
	unsigned char SCAN_LIST_FLAG;
	// – Reserved for future use
	unsigned char priorityAccessInd;
};


struct ST1A_ReachCtrlPara{// – 最大重传数量，0 - 3
	unsigned char maxRetrans;
	/*– 参见GSM 04.08的10.5.2.29节。对应可接入的等级N。
	(N=0-9 and 11-15)，<AC15: bit><AC14: bit><AC13: bit> <AC12:bit><AC11: bit>
	<EC10: 	bit> <AC9: bit><AC8: bit><AC7: bit> <AC6: bit><AC5:bit><AC4: bit>
	<AC3: bit><AC2: 	bit><AC1: bit> <AC0: bit>，– EC10 corresponds to Emergency Calls
	 */
	unsigned char accessClasses[2];
	//– 0：阻止接入；1：可以接入
	unsigned char CELL_BAR_ACCESS;
};

struct ST1A_SynchInfo{//帧时间偏移,有效值为6 - 28参见GMR-1 05.010
	unsigned char SB_FRAME_TS_OFFSET;
	//码元偏移,二进制补码表示，范围是–32~+31 6bit
	char SB_SYMBOL_OFFSET;
	unsigned char SA_FREQ_OFFSET;
};

class ClassOne{
public:
	ClassOne();
	virtual ~ClassOne();


public:
	unsigned char class2Ver;//包含当前class 2 information的版本号
	unsigned char class3Ver;//包含当前class 3 information的版本号
	//	unsigned char synchInfoClass1[19];//系统信息 19 bits
	//	unsigned char reachCtrlParamters[19];//RACH Control parameters. 19 bits
	//	unsigned char miscInfoClass1[6];//包含其它多种信息
	ST1A_SynchInfo synchInfo;//系统信息 19 bits
	ST1A_ReachCtrlPara reachCtrlPara;//RACH Control parameters. 19 bits
	ST1A_MiscInfo miscInfo;//包含其它多种信息
	/*Flag to indicate presence of the GPS broadcast channel
	 *– 0 the GBCH is absent，– 1 the GBCH is present.
	 **/
	unsigned char GBCHPresent;
	unsigned char spare[2];

};

#endif /* BCCHCLASS1_H_ */
